
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="author" content="alpha1e0" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
    Kiwi 扫描报告
</title>

<style>
html * {
    font-family: "Arial", sans-serif;
}
body {
    background-color: #DCDCDC;
}
hr.strong {
    border-top: 3px solid #000000;
}
.footer {
    font-size: 75%;
    padding: 9px 0;
    text-align: center;
    width: 100%;
}
.content {
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    background-color: #FFFFFF;
    border-radius: 5px;
    box-shadow: 5px 5px 2px #888888;
}
.summary {
    padding: 15px 20px 10px 20px;
}
.title {
    font-size: 1.5em;
    padding-top: 5px;
    padding-bottom: 10px;
}

.directory {
    color: #4169E1;
}

.time {
    color: #4169E1;
}

.summary-table {
    border-collapse: collapse;
    margin-bottom: 10px;
}

.summary-table td, .summary-table th 
{
    font-size: 1em;
    text-align: center;
    border: 2px solid #191970;
    padding: 3px 7px 2px 7px;
}
.summary-table th {
    font-size: 1.1em;
    padding-top: 5px;
    padding-bottom: 4px;
    background-color: #ADD8E6;
}
.issue-block {
    margin: 10px 10px 10px 10px;
    padding: 10px 10px 10px 10px;
    color: #696969;
    border-top: solid;
    border-top-width: 2px
}
.issue-block b {
    color: #000000;
}
.issue-title {
    font-size: 1.2em;
}
.issue-pattern {
}
.issue-level-high {
    color: #FF0000
}
.issue-level-medium {
    color: #F4A460
}
.issue-level-low {
    color: #4169E1
}
.issue-level-info {
    color: #66CDAA
}
.issue-handle {
    padding-left: 15px;
    padding-bottom: 10px;
}
.issue-handle input[type="submit"] {
    border: 1px solid #bebebe;
    height: 20px;
    padding-left: 5px;
    padding-right: 5px;
}
.issue-handle input[type="submit"]:hover {
    border: 1px solid #999;
}
.issue-handle input[type='text']{
    width: 50%;
}
.context {
    margin: 10px 0px 5px 0px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    background-color: #F0FFFF;
}
.context pre {
    font-family: sans-serif;
    color: #2030a2;
    padding: 0px 5px 0px 5px
}
.lineno {
    color: #FF7F50;
}
.lineno-strong {
    color: #FF0000;
}
.issue-label {
    margin-bottom: 4px;
}
.issue-label {
    margin-bottom: 4px;
}
.label {
    border-radius: 0.25em;
    color: #fff;
    display: inline;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    padding: 0.2em 0.6em 0.3em;
    margin-bottom: 4px;
    text-align: center;
    vertical-align: baseline;
    white-space: nowrap;
}
.label-high {
    background-color: #d9534f;
}
.label-medium {
    background-color: #f0ad4e;
}
.label-low {
    background-color: #337ab7;
}
.label-info {
    background-color: #5cb85c;
}
.label-id {
    background-color: #F0F0F0;
}

.select-box {
    margin: 2px 5px 3px 15px;
    padding: 2px 5px 3px 5px;
}
.label-large {
    font-size: 100%;
    background-color: #525252
}
.issue-table {
    margin: 5px 5px 3px 2px;
    padding: 5px 5px 3px 2px;
}
.btn {
    font-size: 90%;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    display: inline-block;
    border-radius: 2px;
}
.btn-primary {
    background-color: #337ab7;
    border-color: #2e6da4;
    color: #fff;
}
.issue-link {
    color: #FF0000;
    text-decoration:none
}


</style>
</head>

<body>
<div class='content'>
<div class='summary'>
    <div class='title'>
        Kiwi. Scaning <span class='directory'>{{scaninfo.directory}}</span> at <span class='time'>{{scaninfo.scan_time}}</span> <br>
    </div>
    <hr />
    <table class='summary-table'>
        <thead>
            <tr>
                <th>严重程度</th>
                <th>致命</th>
                <th>严重</th>
                <th>一般</th>
                <th>提示</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>漏洞个数</td>
                {% for sc in scaninfo.severity_contents %}
                    <td>{{sc}}</td>
                {% endfor %}
            </tr>
        </tbody>
    </table>
    <table class='summary-table'>
        <thead>
            <tr>
                <th>编程语言</th>
                {% for scope in scaninfo.scope_titles %}
                    <th>{{scope}}</th>
                {% endfor %}
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>代码行数</td>
                {% for sno in scaninfo.scope_contents %}
                    <td>{{sno}}</td>
                {% endfor %}
            </tr>
        </tbody>
    </table>
</div>

<hr class='strong' />
<div id='results'>
{% for issue in issues %}
    <div class='issue' id='{{issue.id}}'>
        <div class='issue-block'>
            <div class='issue-label'>
                <span class='label label-id'><a class='issue-link' href="#{{issue.id}}">ISSUE-{{issue.id}}</a></span>
                <span class='label label-{{issue.status_class}}' id='issue_status'>{{issue.status_prompt}}</span>
                <span class='label label-{{issue.severity_class}}' id='issue_severity'>{{issue.severity_prompt}}</span>
                <span class='label label-{{issue.confidence_class}}'>{{issue.confidence_prompt}}</span>
            </div>
            <div class='issue-title' id='{{issue.issueid}}'>
                <b>{{issue.issueid}}: </b> {{issue.name}}<br>
            </div>
            <b>匹配关键字: </b><ins class='issue-pattern'>{{issue.pattern}}</ins>&nbsp&nbsp
            <b>目标文件: </b><a href='{{issue.filelink}}' target='_blank'>{{issue.filename}}</a><br />
            
            <div class='context'>
                <pre>{%- for line in issue.context -%}
                        {%- if line[0]==issue.lineno -%}
                            <i class='lineno-strong'>{{line[0]}}: </i>{{line[1]}}
                        {%- else -%}
                            <i class='lineno'>{{line[0]}}: </i>{{line[1]}}
                        {%- endif -%}
                     {%- endfor -%}</pre>
            </div>
        </div>
    </div>
{% endfor %}
</div>
</div>
<div class='footer'>© Copyright 2017, alpha1e0. See <a href='https://github.com/alpha1e0/kiwi'>Kiwi.</a></div>
</body>
</html>
